package com.accounting.juanjuan.entity;

/**
 * 错误返回值
 *
 * @Author xxj
 * @Date 2024/1/27 23:16
 * @Version 1.0
 */
public class ErrorData {
    /**
     * 错误码
     */
    private String code;

    /**
     * 错误信息
     */
    private String message;

    public void setCode(String code) {
        this.code = code;
    }

    public String getCode() {
        return code;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getMessage() {
        return message;
    }

    public String toJson() {
        return String.format("{\"code\":\"%s\",\"message\":\"%s\"}", code, message);
    }
}
